/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_Studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#include "构建计算节点.h"

#include <节点/计算/单数值计算.h>
#include <节点/计算/矢量计算.h>
#include <节点/计算/矩阵节点.h>
#include <节点/计算/点集几何计算.h>



static void on_节点参数更新(S_Props& prop) {
	//switch ((*(S_PropValueEnum*)prop.m_Value).m_当前选项)
	auto nodes = f_global_get激活节点();
	for (auto 节点 : nodes) {
		节点->f_set是否要更新(true);
	}
	//((C_节点面板*)f_global_get激活节点())->m_NodeData->f_set是否要更新(true);

}

static void on_节点参数更新_重新编译(S_Props& prop) {
	auto nodes = f_global_get激活节点();
	for (auto 节点 : nodes) {
		节点->f_更新上层节点(true);
	}
}



static void f_回写节点节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_回写节点* node = dynamic_cast<C_回写节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_回写节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_回写节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_回写节点(plane, node);
	return plane;
}

void f_节点重置_回写节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_回写节点节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_逻辑计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_逻辑计算节点* node = dynamic_cast<C_逻辑计算节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_逻辑计算节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_逻辑计算节点(ctx_3d);
		node->m_ICO = "ico编辑网格0014";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_逻辑计算节点(plane, node);
	return plane;
}

void f_节点重置_逻辑计算节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_逻辑计算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}


static void f_单值计算节点_3D视口更新(C_节点面板* node, S_Scene* scene) {
	C_单值计算节点* 网格节点 = dynamic_cast<C_单值计算节点*>(node->m_NodeData);

}

static void f_单值计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_单值计算节点* node = dynamic_cast<C_单值计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	//props.push_back(node->m_是否改变原数据);
	//props.push_back(node->m_执行代码);

	plane->f_构建属性部件(props);

	f_单值计算节点_3D视口更新(((C_节点面板*)obj), nullptr);

}

C_节点面板* f_节点构建_单值计算(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_单值计算节点(dev_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_单值计算(plane, node);
	return plane;
}

void f_节点重置_单值计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_单值计算节点_部件构建属性;
	plane->m_3D视口更新 = f_单值计算节点_3D视口更新;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_单目计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_单目计算节点* node = dynamic_cast<C_单目计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_单目计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_单目计算节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_单目计算(plane, node);
	return plane;
}

void f_节点重置_单目计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_单目计算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_位运算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_位运算节点* node = dynamic_cast<C_位运算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	node->m_是否改变原数据.m_UI->m_Update = on_节点参数更新_重新编译;
	props.push_back(node->m_是否改变原数据);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_位运算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_位运算节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_位运算(plane, node);
	return plane;
}

void f_节点重置_位运算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_位运算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_累计计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_累计计算节点* node = dynamic_cast<C_累计计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_累计计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_累计计算节点(ctx_3d);
		node->m_ICO = "";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_累计计算(plane, node);
	return plane;
}

void f_节点重置_累计计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_累计计算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_矢量计算节点_3D视口更新(C_节点面板* node, S_Scene* scene) {
	C_矢量计算节点* 网格节点 = dynamic_cast<C_矢量计算节点*>(node->m_NodeData);

	/*auto& obs = *DEF_物体Array1D插座Value(网格节点->f_get输出插座(1), 0);
	if (obs.size()) {
		f_surface_创建实例((S_Mesh*)S_Core::g_当前独立显示物体->m_Data[0], (S_Mesh*)obs[0]->m_Data[0]);
		f_surface_创建实例((S_Mesh*)S_Core::g_当前独立显示物体->m_Data[1], (S_Mesh*)obs[0]->m_Data[0]);
		f_surface_创建实例((S_Mesh*)S_Core::g_当前独立显示物体->m_Data[2], (S_Mesh*)obs[0]->m_Data[0]);
	}
	//f_ob_add子物体(S_Core::g_当前独立显示物体, 0);
	S_Core::g_当前独显物体类型 = E_物体类型::e_模型;
	f_global_所在独显模型材质();*/
}

static void f_矢量计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_矢量计算节点* node = dynamic_cast<C_矢量计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	S_Props prop = node->m_计算方式;
	props.push_back(prop);

	props.push_back(node->m_是否改变原数据);
	props.push_back(node->m_执行代码);

	plane->f_构建属性部件(props);

	f_矢量计算节点_3D视口更新(((C_节点面板*)obj), nullptr);
}


C_节点面板* f_节点构建_矢量计算(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_矢量计算节点(dev_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_矢量计算(plane, node);
	return plane;
}

void f_节点重置_矢量计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_矢量计算节点_部件构建属性;
	plane->m_3D视口更新 = f_矢量计算节点_3D视口更新;
	plane->m_ICO = "ico矢量计算0015";
}



static void f_三角函数计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_三角函数计算节点* node = dynamic_cast<C_三角函数计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_三角函数计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_三角函数计算节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_三角函数计算(plane, node);
	return plane;
}

void f_节点重置_三角函数计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_三角函数计算节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}



static void f_归一化节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_向量归一化节点* node = dynamic_cast<C_向量归一化节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_归一化计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_向量归一化节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_归一化计算(plane, node);
	return plane;
}

void f_节点重置_归一化计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_归一化节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_几何计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_几何计算节点* node = dynamic_cast<C_几何计算节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_几何计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_几何计算节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_几何计算(plane, node);
	return plane;
}

void f_节点重置_几何计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_几何计算节点_部件构建属性;
	plane->m_3D视口更新 = f_矢量计算节点_3D视口更新;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_向量标量计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_计算两向量点积量节点* node = dynamic_cast<C_计算两向量点积量节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_两向量标量计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_计算两向量点积量节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_两向量标量计算(plane, node);
	return plane;
}

void f_节点重置_两向量标量计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_向量标量计算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_合并XYZ节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_合并XYZ节点* node = dynamic_cast<C_合并XYZ节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_合并XYZ(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_合并XYZ节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_合并XYZ(plane, node);
	return plane;
}

void f_节点重置_合并XYZ(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_合并XYZ节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_分离XYZ节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_分离XYZ节点* node = dynamic_cast<C_分离XYZ节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_分离XYZ(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_分离XYZ节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_分离XYZ(plane, node);
	return plane;
}

void f_节点重置_分离XYZ(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_分离XYZ节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_混合节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_混合节点* node = dynamic_cast<C_混合节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_混合(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_混合节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_混合(plane, node);
	return plane;
}

void f_节点重置_混合(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_混合节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_设置矢量分量节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_设置矢量分量节点* node = dynamic_cast<C_设置矢量分量节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_是否改变原数据.m_UI->m_Update = on_节点参数更新_重新编译;
	props.push_back(node->m_是否改变原数据);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_设置矢量分量(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_设置矢量分量节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_设置矢量分量(plane, node);
	return plane;
}

void f_节点重置_设置矢量分量(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_设置矢量分量节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}










static void f_矩阵变换节点_3D视口更新(C_节点面板* node, S_Scene* scene) {
	C_矩阵变换节点* 网格节点 = dynamic_cast<C_矩阵变换节点*>(node->m_NodeData);

}

static void f_矩阵变换节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_矩阵变换节点* node = dynamic_cast<C_矩阵变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	//node->m_计算方式.m_UI->m_Update = on_切换计算方式;
	node->m_是否改变原数据.m_UI->m_Update = on_节点参数更新;
	node->m_执行代码.m_UI->m_Update = on_节点参数更新;
	//props.push_back(node->m_计算方式);
	props.push_back(node->m_是否改变原数据);
	props.push_back(node->m_执行代码);

	plane->f_构建属性部件(props);

	f_矩阵变换节点_3D视口更新(((C_节点面板*)obj), nullptr);

}

C_节点面板* f_节点构建_矩阵变换(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_矩阵变换节点(dev_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_矩阵变换(plane, node);
	return plane;
}

void f_节点重置_矩阵变换(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_矩阵变换节点_部件构建属性;
	plane->m_3D视口更新 = f_矩阵变换节点_3D视口更新;
	plane->m_ICO = "ico矢量计算0015";
}



static void f_矩阵计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_矩阵计算节点* node = dynamic_cast<C_矩阵计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	node->m_是否改变原数据.m_UI->m_Update = on_节点参数更新;
	node->m_执行代码.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	props.push_back(node->m_是否改变原数据);
	props.push_back(node->m_执行代码);

	plane->f_构建属性部件(props);

	f_矩阵变换节点_3D视口更新(((C_节点面板*)obj), nullptr);

}
C_节点面板* f_节点构建_矩阵计算(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_矩阵计算节点(dev_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_矩阵计算(plane, node);
	return plane;
}

void f_节点重置_矩阵计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_矩阵计算节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_矩阵转换节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_矩阵转换节点* node = dynamic_cast<C_矩阵转换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_转换类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_转换类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_矩阵转换(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_矩阵转换节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_矩阵转换(plane, node);
	return plane;
}

void f_节点重置_矩阵转换(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_矩阵转换节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}






static void f_射线相交节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_射线物体相交节点* node = dynamic_cast<C_射线物体相交节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_使用光追线管.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_使用光追线管);
	//node->m_是否构建八叉树.m_UI->m_Update = on_节点参数更新;
	//props.push_back(node->m_是否构建八叉树);
	plane->f_构建属性部件(props);

}

C_节点面板* f_节点构建_射线相交(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_射线物体相交节点(ctx_3d);
		node->m_ICO = "ico编辑网格0014";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_射线相交(plane, node);
	return plane;
}

void f_节点重置_射线相交(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_射线相交节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_向量转角度节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_两向量转四元数节点* node = dynamic_cast<C_两向量转四元数节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_向量转四元数(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_两向量转四元数节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_向量转四元数(plane, node);
	return plane;
}

void f_节点重置_向量转四元数(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_向量转角度节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_向量长度节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_计算单向量标量节点* node = dynamic_cast<C_计算单向量标量节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_向量长度(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_计算单向量标量节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_向量长度(plane, node);
	return plane;
}

void f_节点重置_向量长度(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_向量长度节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_四元数计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_四元数计算节点* node = dynamic_cast<C_四元数计算节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_四元数计算(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_四元数计算节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_四元数计算(plane, node);
	return plane;
}

void f_节点重置_四元数计算(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_四元数计算节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_四元数变换_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_四元数变换节点* node = dynamic_cast<C_四元数变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算方式);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_四元数变换(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_四元数变换节点(ctx_3d);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_四元数变换(plane, node);
	return plane;
}

void f_节点重置_四元数变换(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_四元数变换_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}




static void f_向量角度组成四元数节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_向量角度组成四元数节点* node = dynamic_cast<C_向量角度组成四元数节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_向量角度组成四元数(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_向量角度组成四元数节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_向量角度组成四元数(plane, node);
	return plane;
}

void f_节点重置_向量角度组成四元数(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_向量角度组成四元数节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_四元数转换为欧拉角节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_四元数转换为欧拉角节点* node = dynamic_cast<C_四元数转换为欧拉角节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	//node->m_转换类型.m_UI->m_Update = on_节点参数更新;
	//props.push_back(node->m_转换类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_四元数转换为欧拉角(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_四元数转换为欧拉角节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_四元数转换为欧拉角(plane, node);
	return plane;
}

void f_节点重置_四元数转换为欧拉角(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_四元数转换为欧拉角节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_四元数转换为矩阵节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_四元数转换为矩阵节点* node = dynamic_cast<C_四元数转换为矩阵节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_四元数转换为矩阵节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_四元数转换为矩阵节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_四元数转换为矩阵节点(plane, node);
	return plane;
}

void f_节点重置_四元数转换为矩阵节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_四元数转换为矩阵节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_旋转向量节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_旋转向量节点* node = dynamic_cast<C_旋转向量节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_旋转向量节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_旋转向量节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_旋转向量节点(plane, node);
	return plane;
}

void f_节点重置_旋转向量节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_旋转向量节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_轴向旋转向量节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_按轴向旋转向量节点* node = dynamic_cast<C_按轴向旋转向量节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_轴向旋转向量节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_按轴向旋转向量节点(ctx_3d);
		node->m_ICO = "0空";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_轴向旋转向量节点(plane, node);
	return plane;
}

void f_节点重置_轴向旋转向量节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_轴向旋转向量节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_顶点变换节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_顶点变换节点* node = dynamic_cast<C_顶点变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props; 
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_顶点变换(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_顶点变换节点(dev_ctx);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_顶点变换(plane, node);
	return plane;
}

void f_节点重置_顶点变换(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_顶点变换节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_平面到点节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_平面到点节点* node = dynamic_cast<C_平面到点节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_平面到点节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_平面到点节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_平面到点节点(plane, node);
	return plane;
}

void f_节点重置_平面到点节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_平面到点节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}



static void f_坐标转索引节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_坐标转索引节点* node = dynamic_cast<C_坐标转索引节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_坐标转索引节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_坐标转索引节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_坐标转索引节点(plane, node);
	return plane;
}

void f_节点重置_坐标转索引节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_坐标转索引节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_索引转坐标节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_索引转坐标节点* node = dynamic_cast<C_索引转坐标节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_计算类型.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_计算类型);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_索引转坐标节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_索引转坐标节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_索引转坐标节点(plane, node);
	return plane;
}

void f_节点重置_索引转坐标节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_索引转坐标节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_平面线段相交节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_平面线段相交节点* node = dynamic_cast<C_平面线段相交节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_平面线段相交节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_平面线段相交节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_平面线段相交节点(plane, node);
	return plane;
}

void f_节点重置_平面线段相交节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_平面线段相交节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}






static void f_圆坐标生成节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_圆坐标生成节点* node = dynamic_cast<C_圆坐标生成节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_圆坐标生成节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_圆坐标生成节点(ctx_3d);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_圆坐标生成节点(plane, node);
	return plane;
}

void f_节点重置_圆坐标生成节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_圆坐标生成节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}





static void f_直线节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_直线坐标生成节点* node = dynamic_cast<C_直线坐标生成节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	S_Props prop;
	plane->f_构建属性部件(props);

}
C_节点面板* f_节点构建_直线(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_直线坐标生成节点(ctx_3d);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_直线(plane, node);
	return plane;
}

void f_节点重置_直线(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_物体);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_物体);

	plane->m_属性面板参数构建 = f_直线节点_部件构建属性;
	plane->m_ICO = "ico立方体0001";
}




static void f_步进计算节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_步进计算节点* node = dynamic_cast<C_步进计算节点*>(((C_节点面板*)obj)->m_NodeData);
	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_步进方式.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_步进方式);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_步进计算节点(S_UI创建环境& ctx, S_设备环境& ctx_3d, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_步进计算节点(ctx_3d);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_步进计算节点(plane, node);
	return plane;
}

void f_节点重置_步进计算节点(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_步进计算节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}




static void f_点集约束到变换节点_3D视口更新(C_节点面板* node, S_Scene* scene) {
	C_点集约束到变换节点* 节点 = dynamic_cast<C_点集约束到变换节点*>(node->m_NodeData);

}

static void f_点集约束到变换节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_点集约束到变换节点* node = dynamic_cast<C_点集约束到变换节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);

	plane->f_构建属性部件(props);

	f_点集约束到变换节点_3D视口更新(((C_节点面板*)obj), nullptr);

}

C_节点面板* f_节点构建_点集约束到变换(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_点集约束到变换节点(dev_ctx);
	//if (nullptr == plane) {
	//	plane = f_节点创建_UI面板构建(ctx, node, E_节点区类型::e_节点区_节点视图);
	//}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_点集约束到变换(plane, node);
	return plane;
}

void f_节点重置_点集约束到变换(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_点集约束到变换节点_部件构建属性;
	plane->m_3D视口更新 = f_点集约束到变换节点_3D视口更新;
	plane->m_ICO = "ico矢量计算0015";
}






static void f_渐变采样节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_渐变采样节点* node = dynamic_cast<C_渐变采样节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_曲线.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_曲线);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_渐变采样(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) node = new C_渐变采样节点(dev_ctx);
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_渐变采样(plane, node);
	return plane;
}

void f_节点重置_渐变采样(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板重构(plane, node, E_节点区类型::e_节点区_节点视图);
	f_节点重构_插座重构(plane, node, E_节点区类型::e_节点区_节点视图);

	plane->m_属性面板参数构建 = f_渐变采样节点_部件构建属性;
	plane->m_ICO = "ico矢量计算0015";
}






static void f_绕点旋转节点_部件构建属性(C_属性栏* plane, S_结构对象指针 obj) {
	C_绕点旋转节点* node = dynamic_cast<C_绕点旋转节点*>(((C_节点面板*)obj)->m_NodeData);

	std::vector<S_Props> props;
	f_节点重构_重构属性面板数据((C_节点面板*)obj, props);
	node->m_曲线.m_UI->m_Update = on_节点参数更新;
	props.push_back(node->m_曲线);
	plane->f_构建属性部件(props);
}

C_节点面板* f_节点构建_绕点旋转(S_UI创建环境& ctx, S_设备环境& dev_ctx, C_节点基类* node, C_节点树* tree) {
	if (!node) {
		node = new C_绕点旋转节点(dev_ctx);
		node->m_ICO = "ico矢量计算0015";
	}
	C_节点面板* plane = new C_节点面板(node, ctx, E_节点区类型::e_节点区_物体);
	f_节点重置_绕点旋转(plane, node);
	return plane;
}

void f_节点重置_绕点旋转(C_节点面板* plane, C_节点基类* node) {
	f_节点重构_面板插座重构(plane, node, E_节点区类型::e_节点区_节点视图);
	plane->m_属性面板参数构建 = f_绕点旋转节点_部件构建属性;
	plane->m_ICO = node->m_ICO;
}








bool f_计算节点重构(C_节点面板** plane, C_节点基类* node, S_UI创建环境* ctx) {
	if (node->m_TypeName == "单值计算节点") {
		if (!plane[0]) plane[0] = f_节点构建_单值计算(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_单值计算(plane[0], node);
	}
	else if (node->m_TypeName == "矢量计算节点") {
		if (!plane[0]) plane[0] = f_节点构建_矢量计算(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_矢量计算(plane[0], node);
	}
	else if (node->m_TypeName == "矩阵变换节点") {
		if (!plane[0]) plane[0] = f_节点构建_矩阵变换(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_矩阵变换(plane[0], node);
	}
	else if (node->m_TypeName == "矩阵计算节点") {
		if (!plane[0]) plane[0] = f_节点构建_矩阵计算(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_矩阵计算(plane[0], node);
	}
	else if (node->m_TypeName == "顶点变换节点") {
		if (!plane[0]) plane[0] = f_节点构建_顶点变换(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_顶点变换(plane[0], node);
	}
	else if (node->m_TypeName == "射线相交节点") {
		if (!plane[0]) plane[0] = f_节点构建_射线相交(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_射线相交(plane[0], node);
	}
	else if (node->m_TypeName == "初始化点集转变换节点") {
		if (!plane[0]) plane[0] = f_节点构建_圆坐标生成节点(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_圆坐标生成节点(plane[0], node);
	}
	else if (node->m_TypeName == "点集转变换节点") {
		if (!plane[0]) plane[0] = f_节点构建_点集约束到变换(*ctx, *S_框架::g_3D视口环境, node);
		else f_节点重置_点集约束到变换(plane[0], node);
	}
	else {
		return false;
	}

	return true;
}












